package exception;

abstract class IBException extends Exception {
	/**
	 * 
	 */
	private static final long serialVersionUID = -8491764074937173877L;

	public IBException(ExceptionStringHandler exceptionStringHandler) {
		super(exceptionStringHandler.getExceptionString());
	}
	protected IBException(String simpleMessage) {
		super(simpleMessage);
	}
	
	@Override
	public String getLocalizedMessage() {
		String localizedMessage = super.getLocalizedMessage();
		if(localizedMessage == null)
			localizedMessage = super.getCause().getLocalizedMessage();
		return localizedMessage;
	}
}
